package api.app;

import java.io.IOException;

import org.json.JSONArray;

import common.Host;
import common.Request;

/**
 * 实现帮忙医APP上传咨询图片ApiUploadPicforOnlineConsultation接口调用
 * @author maojj
 *
 */
public class ApiUploadPicforOnlineConsultation
{
	/**
	 * 实现帮忙医APP上传咨询图片ApiUploadPicforOnlineConsultation接口调用
	 * @param images - String数组，数组元素为Base64编码的Image
	 * @return 接口返回数据
	 * @throws IOException
	 */
	public static String post(String[] images) throws IOException
	{
		//拼接接口地址
		String url = Host.getAddress() + "/APIAccount/ApiUploadPicforOnlineConsultation";
		
		//给接口参数赋值
		JSONArray parms = new JSONArray();
		if (images==null || images.length==0)
		{
			parms.put(images);	
		}
		else
		{
			for (String image : images)
			{
				parms.put(image);	
			}
		}
		
		//调用接口并返回接口结果
		String result = Request.post(url, parms);
		return result;
	}
}
